package com.ruoyi.reservation.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reservation.mapper.BookOrderMapper;
import com.ruoyi.reservation.domain.BookOrder;
import com.ruoyi.reservation.service.IBookOrderService;

/**
 * 借阅信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-08
 */
@Service
public class BookOrderServiceImpl implements IBookOrderService 
{
    @Autowired
    private BookOrderMapper bookOrderMapper;

    /**
     * 查询借阅信息
     * 
     * @param orderId 借阅信息主键
     * @return 借阅信息
     */
    @Override
    public BookOrder selectBookOrderByOrderId(Long orderId)
    {
        return bookOrderMapper.selectBookOrderByOrderId(orderId);
    }

    /**
     * 查询借阅信息列表
     * 
     * @param bookOrder 借阅信息
     * @return 借阅信息
     */
    @Override
    public List<BookOrder> selectBookOrderList(BookOrder bookOrder)
    {
        return bookOrderMapper.selectBookOrderList(bookOrder);
    }

    /**
     * 新增借阅信息
     * 
     * @param bookOrder 借阅信息
     * @return 结果
     */
    @Override
    public int insertBookOrder(BookOrder bookOrder)
    {
        return bookOrderMapper.insertBookOrder(bookOrder);
    }

    /**
     * 修改借阅信息
     * 
     * @param bookOrder 借阅信息
     * @return 结果
     */
    @Override
    public int updateBookOrder(BookOrder bookOrder)
    {
        return bookOrderMapper.updateBookOrder(bookOrder);
    }

    /**
     * 批量删除借阅信息
     * 
     * @param orderIds 需要删除的借阅信息主键
     * @return 结果
     */
    @Override
    public int deleteBookOrderByOrderIds(Long[] orderIds)
    {
        return bookOrderMapper.deleteBookOrderByOrderIds(orderIds);
    }

    /**
     * 删除借阅信息信息
     * 
     * @param orderId 借阅信息主键
     * @return 结果
     */
    @Override
    public int deleteBookOrderByOrderId(Long orderId)
    {
        return bookOrderMapper.deleteBookOrderByOrderId(orderId);
    }
}
